<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>trunk.BIP.Bayes.Samplers.MCMC._Sampler</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="trunk.BIP-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bayesian-inference">Project Homepage</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;trunk ::
        <a href="trunk.BIP-module.html">Package&nbsp;BIP</a> ::
        <a href="trunk.BIP.Bayes-module.html">Package&nbsp;Bayes</a> ::
        <a href="trunk.BIP.Bayes.Samplers-module.html">Package&nbsp;Samplers</a> ::
        <a href="trunk.BIP.Bayes.Samplers.MCMC-module.html">Module&nbsp;MCMC</a> ::
        Class&nbsp;_Sampler
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class _Sampler</h1><p class="nomargin-top"><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">_Sampler</strong>
</pre>

<hr />
Base classe for all samplers
Holds common logic and

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">parpriors</span>=<span class="summary-sig-default">[]</span>,
        <span class="summary-sig-arg">parnames</span>=<span class="summary-sig-default">[]</span>)</span><br />
      x.__init__(...) initializes x; see x.__class__.__doc__ for signature</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#best_prop_index" class="summary-sig-name">best_prop_index</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Returns the index of the best fitting proposal, i.e.,
the one which with max Likelihood</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.best_prop_index">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#DIC" class="summary-sig-name">DIC</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Calculates  the deviance information criterion</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.DIC">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#dimensions" class="summary-sig-name">dimensions</a>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.dimensions">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#po" class="summary-sig-name">po</a>(<span class="summary-sig-arg">self</span>)</span><br />
      Pool of processes for parallel execution of tasks
Remember to call self.term_pool() when done.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.po">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#shut_down" class="summary-sig-name">shut_down</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">reason</span>=<span class="summary-sig-default">''</span>)</span><br />
      Finalizes the sampler, nicely closing the resources allocated</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.shut_down">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="term_pool"></a><span class="summary-sig-name">term_pool</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.term_pool">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="gr_R"></a><span class="summary-sig-name">gr_R</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">end</span>,
        <span class="summary-sig-arg">start</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.gr_R">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="gr_convergence"></a><span class="summary-sig-name">gr_convergence</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">relevantHistoryEnd</span>,
        <span class="summary-sig-arg">relevantHistoryStart</span>)</span><br />
      Gelman-Rubin Convergence</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.gr_convergence">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#_accept" class="summary-sig-name" onclick="show_private();">_accept</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">last_lik</span>,
        <span class="summary-sig-arg">lik</span>)</span><br />
      Decides whether to accept a proposal</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler._accept">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setup_xmlrpc_plotserver"></a><span class="summary-sig-name">setup_xmlrpc_plotserver</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Sets up the server for real-time chain watch</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.setup_xmlrpc_plotserver">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="shutdown_xmlrpc_plotserver"></a><span class="summary-sig-name">shutdown_xmlrpc_plotserver</span>(<span class="summary-sig-arg">self</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.shutdown_xmlrpc_plotserver">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_every_plot"></a><span class="summary-sig-name">_every_plot</span>(<span class="summary-sig-arg">self</span>)</span><br />
      plotting function for generating a plot at every step</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler._every_plot">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_watch_chain"></a><span class="summary-sig-name">_watch_chain</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">j</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler._watch_chain">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="_tune_likvar"></a><span class="summary-sig-name">_tune_likvar</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">ar</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler._tune_likvar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#check_constraints" class="summary-sig-name">check_constraints</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">theta</span>)</span><br />
      Check if given theta vector complies with all constraints</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.check_constraints">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="trunk.BIP.Bayes.Samplers.MCMC._Sampler-class.html#_propose" class="summary-sig-name" onclick="show_private();">_propose</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">step</span>,
        <span class="summary-sig-arg">po</span>=<span class="summary-sig-default">None</span>)</span><br />
      Generates proposals.
returns two lists</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler._propose">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_po"></a><span class="summary-name">_po</span> = <code title="None">None</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_dimensions"></a><span class="summary-name">_dimensions</span> = <code title="None">None</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="trace_acceptance"></a><span class="summary-name">trace_acceptance</span> = <code title="False">False</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="trace_convergence"></a><span class="summary-name">trace_convergence</span> = <code title="False">False</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="seqhist"></a><span class="summary-name">seqhist</span> = <code title="None">None</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="liklist"></a><span class="summary-name">liklist</span> = <code title="[]">[]</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="e"></a><span class="summary-name">e</span> = <code title="1e-20">1e-20</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_j"></a><span class="summary-name">_j</span> = <code title="-1">-1</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_R"></a><span class="summary-name">_R</span> = <code title="np.inf">np.inf</code>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">parpriors</span>=<span class="sig-default">[]</span>,
        <span class="sig-arg">parnames</span>=<span class="sig-default">[]</span>)</span>
    <br /><em class="fname">(Constructor)</em>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.__init__">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>x.__init__(...) initializes x; see x.__class__.__doc__ for 
  signature</p>
  <dl class="fields">
    <dt>Overrides:
        object.__init__
        <dd><em class="note">(inherited documentation)</em></dd>
    </dt>
  </dl>
</td></tr></table>
</div>
<a name="best_prop_index"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">best_prop_index</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.best_prop_index">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Returns the index of the best fitting proposal, i.e.,
the one which with max Likelihood
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@property</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="DIC"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">DIC</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.DIC">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Calculates  the deviance information criterion
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@property</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="dimensions"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">dimensions</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.dimensions">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@property</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="po"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">po</span>(<span class="sig-arg">self</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.po">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Pool of processes for parallel execution of tasks
Remember to call self.term_pool() when done.
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@property</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="shut_down"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">shut_down</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">reason</span>=<span class="sig-default">''</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.shut_down">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Finalizes the sampler, nicely closing the resources allocated
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>reason</code></strong> - : comment stating why the sampling is being shutdown.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="_accept"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_accept</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">last_lik</span>,
        <span class="sig-arg">lik</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler._accept">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Decides whether to accept a proposal
  <dl class="fields">
    <dt>Decorators:</dt>
    <dd><ul class="nomargin-top">
        <li><code>@np.vectorize</code></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="check_constraints"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">check_constraints</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">theta</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler.check_constraints">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Check if given theta vector complies with all constraints
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>theta</code></strong> - : parameter vector</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>True if theta passes all constraints, False otherwise</dd>
  </dl>
</td></tr></table>
</div>
<a name="_propose"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">_propose</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">step</span>,
        <span class="sig-arg">po</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="trunk.BIP.Bayes.Samplers.MCMC-pysrc.html#_Sampler._propose">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  Generates proposals.
returns two lists
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>step</code></strong> - : Position in the markov chain history.</li>
        <li><strong class="pname"><code>po</code></strong> - : Process pool for parallel proposal generation</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd><ul class="rst-simple">
<li><code class="link">theta</code>: List of proposed self.dimensional points in parameter space</li>
<li><code class="link">prop</code>: List of self.nchains proposed phis.</li>
</ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="trunk.BIP-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/bayesian-inference">Project Homepage</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed Jan 26 15:29:58 2011
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
